{if ( $page neq 1 )}
    <a href="./users_list.php?page=1"><<</a> <a href="./users_list.php?page={$page - 1}"><</a>
{/if}
{if ( ( $page - 2 ) gt 0 )}
     <a href="./users_list.php?page={$page - 2}">{$page - 2}</a>
{/if}
{if ( ( $page - 1 ) gt 0 )}
    <a href="./users_list.php?page={$page - 1}">{$page - 1}</a>
{/if}

 <a class="selected">{$page}</a>
 
{if ( ( $page + 1 ) lte $totalPages )}
    <a href="./users_list.php?page={$page + 1}">{$page + 1}</a>
{/if}
{if ( ( $page + 2 ) lte $totalPages )}
    <a href="./users_list.php?page={$page + 2}">{$page + 2}</a>
{/if}
{if ( $page neq $totalPages )}
    <a href="./users_list.php?page={$page + 1}">></a> <a href="./users_list.php?page={$totalPages}">>></a>
{/if}